package com.winning.pmph.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import org.jsoup.nodes.Document;

import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@Data
@Table(name = "exam_book_article")
@XmlRootElement(name = "Article")
@XmlAccessorType(XmlAccessType.FIELD)
public class ExamBookArticle {
    public static final String SITUATION_FRONT = "FRONT";
    public static final String SITUATION_BODY = "BODY";
    public static final String SITUATION_BACK = "BACK";
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @TableId
    private String id;

    @SerializedName("book_id")
    private String bookId;

    @XmlElement(name = "Sequence_Number")
    @SerializedName("sequence_number")
    private String sequenceNumber;

    @XmlElement(name = "Identifier")
    private String identifier;

    @XmlElement(name = "Author")
    private String author;

    @XmlElement(name = "Title")
    private String title;

    @XmlElement(name = "Belong_titles")
    @SerializedName("belong_titles")
    private String belongTitles;

    @XmlElement(name = "Contain_titles")
    @SerializedName("contain_titles")
    private String containTitles;

    @XmlElement(name = "Page_Number")
    @SerializedName("page_number")
    private String pageNumber;

    @XmlElement(name = "Page_Number2")
    @SerializedName("page_number2")
    private String pageNumber2;

    @XmlElement(name = "Abstract")
    @SerializedName("abstract_content")
    private String abstractContent;

    @XmlElement(name = "Keywords")
    private String keywords;

    @XmlElement(name = "Article_type")
    @SerializedName("article_type")
    private String articleType;

    @XmlElement(name = "Case_or_no")
    @SerializedName("case_or_no")
    private String caseOrNo;

    @XmlElement(name = "Case_diagnosis")
    @SerializedName("case_diagnosis")
    private String caseDiagnosis;

    @XmlElement(name = "department_code")
    @SerializedName("department_code")
    private String departmentCode;

    @XmlElement(name = "ECG_code")
    @SerializedName("ecg_code")
    private String ecgCode;

    @XmlElement(name = "location_code")
    @SerializedName("location_code")
    private String locationCode;

    @XmlElement(name = "Chinese_disease")
    @SerializedName("chinese_disease")
    private String chineseDisease;

    @XmlElement(name = "Chinese_dis_Alias")
    @SerializedName("chinese_dis_alias")
    private String chineseDisAlias;

    @XmlElement(name = "English_dis")
    @SerializedName("english_dis")
    private String englishDis;

    @XmlElement(name = "English_dis_Alias")
    @SerializedName("english_dis_Alias")
    private String englishDisAlias;

    @XmlElement(name = "Age")
    private String age;

    @XmlElement(name = "HI_of_age")
    @SerializedName("hi_of_age")
    private String hiOfAge;

    @XmlElement(name = "Gender")
    private String gender;

    @XmlElement(name = "High_risk_group")
    @SerializedName("high_risk_group")
    private String highRiskGroup;

    @XmlElement(name = "Infection")
    private String infection;

    @XmlElement(name = "ICD-10_code")
    @SerializedName("icd_10_code")
    @TableField("icd_10_code")
    private String icd10Code;

    @XmlElement(name = "ICD-9-CM_code")
    @SerializedName("icd_9_cm_code")
    @TableField("icd_9_cm_code")
    private String icd9CmCode;

    @XmlElement(name = "Symptoms_classification")
    @SerializedName("symptoms_classification")
    private String symptomsClassification;

    @XmlElement(name = "LE_classification")
    @SerializedName("le_classification")
    private String leClassification;

    @XmlElement(name = "Drugs_classification")
    @SerializedName("drugs_classification")
    private String drugsClassification;

    @XmlElement(name = "ICD-10_words")
    @SerializedName("icd_10_words")
    @TableField("icd_10_words")
    private String icd10Words;

    @XmlElement(name = "ICD-9-CM_words")
    @SerializedName("icd_9_cm_words")
    @TableField("icd_9_cm_words")
    private String icd9CmWords;

    @XmlElement(name = "Symptoms_words")
    @SerializedName("symptoms_words")
    private String symptomsWords;

    @XmlElement(name = "LE_words")
    @SerializedName("le_words")
    private String leWords;

    @XmlElement(name = "Drugs_words")
    @SerializedName("drugs_words")
    private String drugsWords;

    @XmlElement(name = "Classification_of_content")
    @SerializedName("classification_of_content")
    private String classificationOfContent;

    @XmlElement(name = "Contains_Pictures")
    @SerializedName("contains_pictures")
    private String containsPictures;

    @XmlElement(name = "Contains_Tables")
    @SerializedName("contains_tables")
    private String containsTables;

    @XmlElement(name = "Unit_Words")
    @SerializedName("unit_words")
    private String unitWords;

    @XmlElement(name = "Unit_content")
    @SerializedName("unit_content")
    private String unitContent;
    @TableField(exist = false)
    private Document unitContentDom;  // unit_content 对应dom, 解析图书时使用;

    private String situation;

    /**
     * 同步文章内容时使用, 文章序号;
     */
    @TableField(exist = false)
    private Integer idx;
    /**
     * 前端使用, 当前目录, html标签ID;
     */
    @TableField(exist = false)
    private String crtBookCatalogItemTagId;

    /**
     * 同步时使用
     */
    @TableField(exist = false)
    private Integer version;

}
